package audio_testing;

public class TranslateByteToDouble {
				private  byte[] data;
				private  int num;
				public double ByteToDouble(int id) {
			        int a = data[id<< 1] & 0xFF;
			        int b = data[(id << 1) + 1] << 8;
			        return (b | a)/32768.0;
			    }
			public void setData(byte []data){
				this.data = data;
				num=data.length/2;
			}
			
			public byte getData(int i){
				return data[i];  
			}
			public int getNum(){
				return num;
			}
}			
